#ifndef _ACCEPTOR_H
#define _ACCEPTOR_H

#include "01_InetAddress.hpp"
#include "02_Socket.hpp"
#include <string>

namespace xy
{
class Acceptor
{
public:
    Acceptor(unsigned short, const std::string&);
    int bind();
    void listen();
    void SetReuseAddr(bool);
    void SetReusePort(bool);
    void ready();
    int accept();

private:
    InetAddress _addr;
    Socket _sock;
};
}


#endif

